package com.lebang.medicalInquiry.service;

import com.alibaba.fastjson.JSONObject;
import com.lebang.medicalInquiry.component.RedisComponent;
import com.lebang.medicalInquiry.constant.RedisKeyEnum;
import com.lebang.medicalInquiry.mapper.OffLineNoticeMapper;
import com.lebang.medicalInquiry.model.po.OffLineNotice;
import com.lebang.medicalInquiry.model.vo.MessageModel;
import com.lebang.medicalInquiry.model.vo.OfflineNoticeVo;
import com.lebang.medicalInquiry.utils.TextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

@Component
public class AsyncService {
    @Resource
    private OffLineNoticeMapper offLineNoticeMapper;

    @Autowired
    private RedisComponent redisComponent;

    // 删除用户离线消息
    @Async
    public void removeOffLineMessage(String fromUuid, String toUuid) {

        offLineNoticeMapper.removeByUuidAndChatUuid(fromUuid, toUuid);
    }


}
